This paper proposes a topology optimization method to optimize the distribution of material within an electrical machine using a genetic algorithm (GA) and considering the types of materials used. The rotor structure in a permanent magnet synchronous motor with concentrated windings is used to demonstrate the proposed method; a rectangular current and sinusoidal current excitation scheme are considered. The rotor shapes obtained using the two excitation schemes are compared. A r-oriented magnet gives a surface permanent magnet type rotor. x-oriented and y-oriented magnets give an interior permanent magnet type rotor, whose shape is "W" or "V". There are some differences in rotor shape between a rectangular wave drive and sine wave drive method.